home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Utilities / Catalogers / Catalog +2.0 / Read Me < prev   
Text File  |  1989-07-15  |  4KB  |  98 lines

  1. Catalog+ 2.0
  2. by 
  3. Charles Bess
  4. written in Lightspeed C
  5. Overview
  6. Catalog+ is a utility for viewing information about files. It has one 
  7. feature that I have not found on any other directory program for the 
  8. Macintosh. It utilizes regular expressions. Regular expressions allow 
  9. the user to develop complex statements for matching patterns. 
  10. Regular expressions are common in UNIX tools. They will be 
  11. explained in more detail later. I have also implemented regular 
  12. expressions for searching file types and owner applications.
  13. File specification
  14. Files can be specified by the standard Macintosh convention:
  15.  
  16. Volume name: (folder name:) (...:) file name
  17.  
  18. Since this is a a directory program I have added the capability of 
  19. running through child directories by using three periods followed by 
  20. a colon. The Volume name and any folder names you supply have to 
  21. be spelled correctly and in the correct case (i.e. dog is not equal to 
  22. Dog). An example of running through an entire volume (Dog) looking 
  23. for files that begin with a would be:
  24.  
  25. Dog:...:^[Aa]
  26. Options
  27. There are many display options available from this program. It will 
  28. display the files owner application type ... The different output 
  29. columns are separated by spaces if the output is sent to a printer or 
  30. the screen. When the output is sent to a file it is separated by tabs. It 
  31. should be suitable for loading into a database program for sorting 
  32. etc.
  33.  
  34.  
  35. Regular Expressions
  36. Regular expressions are used for matching patterns of text. The 
  37. following text  explains the major regular expression special 
  38. characters.
  39. $
  40. The dollar sign in a regular expression stands for the end of the 
  41. string. If you were trying to match a file that ended in ing your 
  42. regular expression should be:
  43. ing$.
  44. ^
  45. The hat stands for the beginning of a string. If you were trying to 
  46. match a file that starts with micro the regular expression should be:
  47. ^micro.
  48. *
  49. The star means zero or more multiples of a previous pattern. For 
  50. example if you would like to match zero or more multiples of an a 
  51. with a b before it  your expression would be:
  52. ba*.
  53. +
  54. The plus means one or more multiples of a previous pattern. For 
  55. example if you would like to match  an a with a b before it  your 
  56. expression would be: ba*.
  57. .
  58. Period is a place holder that stands for any letter. If you were trying 
  59. to match a string that had an a separated from a c by one letter the 
  60. pattern would be:
  61.  a.c.
  62. []
  63. The brackets are used to make special matching sequences. If you 
  64. were trying to match a A and an a the pattern would be:
  65. [Aa]
  66. There is also a way to specify that you do not want it to be an A or a. 
  67. The hat (^) is used to mean not the following. For example if we 
  68. wanted all the files that did not start with a the expression would be:
  69. ^[^Aa]
  70. Another type of sequence can contain a group of letters. The dash (-) 
  71. is used to specify a range of letters. For example if I wanted all the 
  72. files that begin with a lower case letter I would use the expression:
  73. ^[a-z]
  74. \
  75. This letter has special meaning when you need to use one of the 
  76. previous characters or a number. Otherwise it means take the next 
  77. character literally. For example if you wanted to look through the 
  78. system for files that end with .c or .C the expression would be:
  79. \.[Cc]$
  80. ?
  81. The  question mark means zero or 1 match of a previous pattern. For 
  82. example if you would like to match zero or more multiples of an a 
  83. with a b before it  your expression would be:
  84. ba*.
  85.  
  86. examples
  87.  
  88. .*        matches anything
  89.  
  90. a*b        matches zero or more a's followed by a b
  91.                 (abcdef, b,aaaaaaab)
  92.                 
  93. [0-9]        matches any integer
  94.  
  95. [0-9.Ee+-]    matches any real
  96.  
  97.  
  98.